import request from "/@/utils/request"

export const getListByPid = (params?: Object) => {
    return request({
        url: '/eletile-mes/CodeItem/getListByPid',
        method: 'get',
        params,
    });
};

export function fetchList(query?: Object) {
    return request({
        url: '/eletile-mes/CodeItem/page',
        method: 'get',
        params: query
    })
}

export function addObj(obj?: Object) {
    return request({
        url: '/eletile-mes/CodeItem',
        method: 'post',
        data: obj
    })
}

export function getObj(id?: string) {
    return request({
        url: '/eletile-mes/CodeItem/' + id,
        method: 'get'
    })
}

export function delObjs(id?: Object) {
    return request({
        url: '/eletile-mes/CodeItem/' + id,
        method: 'delete',
    })
}



export function putObj(obj?: Object) {
    return request({
        url: '/eletile-mes/CodeItem',
        method: 'put',
        data: obj
    })
}